Given /^I have created a survey named (.+)$/ do |name|
  Survey.create!(:name => name, :description => 'test desc')
end

When /^i go to the test page for (.+)$/ do |name|
  survey = Survey.find_by_name(name)
  visit "examiner/test/#{survey.id}"
end

Given /^I have created a trend survey named (.+)$/ do |name|
  Survey.create!(:name => name, :t_type => "倾向测试", :description => 'test desc')
end

Given /^I have created a count survey named (.+)$/ do |name|
  Survey.create!(:name => name, :t_type => "计分测试", :description => 'test desc')
end
